Integrand size = 27, antiderivative size = 274 \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \left (d+f x^2\right )} \, dx=\frac {\sqrt {f} (b B d-A c d+a A f) \arctan \left (\frac {\sqrt {f} x}{\sqrt {d}}\right )}{\sqrt {d} \left (c^2 d^2-2 a c d f+f \left (b^2 d+a^2 f\right )\right )}-\frac {\left (A b^2 f+2 A c (c d-a f)-b B (c d+a f)\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (c^2 d^2-2 a c d f+f \left (b^2 d+a^2 f\right )\right )}+\frac {(B c d+A b f-a B f) \log \left (a+b x+c x^2\right )}{2 \left (c^2 d^2-2 a c d f+f \left (b^2 d+a^2 f\right )\right )}-\frac {(B c d+A b f-a B f) \log \left (d+f x^2\right )}{2 \left (c^2 d^2-2 a c d f+f \left (b^2 d+a^2 f\right )\right )} \]
1/2*(A*b*f-B*a*f+B*c*d)*ln(c*x^2+b*x+a)/(c^2*d^2-2*a*c*d*f+f*(a^2*f+b^2*d) )-1/2*(A*b*f-B*a*f+B*c*d)*ln(f*x^2+d)/(c^2*d^2-2*a*c*d*f+f*(a^2*f+b^2*d))- (A*b^2*f+2*A*c*(-a*f+c*d)-b*B*(a*f+c*d))*arctanh((2*c*x+b)/(-4*a*c+b^2)^(1 /2))/(c^2*d^2-2*a*c*d*f+f*(a^2*f+b^2*d))/(-4*a*c+b^2)^(1/2)+(A*a*f-A*c*d+B *b*d)*arctan(x*f^(1/2)/d^(1/2))*f^(1/2)/(c^2*d^2-2*a*c*d*f+f*(a^2*f+b^2*d) )/d^(1/2)
Time = 0.22 (sec) , antiderivative size = 212, normalized size of antiderivative = 0.77 \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \left (d+f x^2\right )} \, dx=\frac {2 \sqrt {-b^2+4 a c} \sqrt {f} (b B d-A c d+a A f) \arctan \left (\frac {\sqrt {f} x}{\sqrt {d}}\right )+\sqrt {d} \left (2 \left (A b^2 f+2 A c (c d-a f)-b B (c d+a f)\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )+\sqrt {-b^2+4 a c} (B c d+A b f-a B f) \left (-\log \left (d+f x^2\right )+\log (a+x (b+c x))\right )\right )}{2 \sqrt {-b^2+4 a c} \sqrt {d} \left (c^2 d^2-2 a c d f+f \left (b^2 d+a^2 f\right )\right )} \]
(2*Sqrt[-b^2 + 4*a*c]*Sqrt[f]*(b*B*d - A*c*d + a*A*f)*ArcTan[(Sqrt[f]*x)/S qrt[d]] + Sqrt[d]*(2*(A*b^2*f + 2*A*c*(c*d - a*f) - b*B*(c*d + a*f))*ArcTa n[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]] + Sqrt[-b^2 + 4*a*c]*(B*c*d + A*b*f - a* B*f)*(-Log[d + f*x^2] + Log[a + x*(b + c*x)])))/(2*Sqrt[-b^2 + 4*a*c]*Sqrt [d]*(c^2*d^2 - 2*a*c*d*f + f*(b^2*d + a^2*f)))
Time = 0.47 (sec) , antiderivative size = 224, normalized size of antiderivative = 0.82, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.370, Rules used = {1356, 25, 27, 452, 218, 240, 1142, 1083, 219, 1103}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {A+B x}{\left (d+f x^2\right ) \left (a+b x+c x^2\right )} \, dx\) |
\(\Big \downarrow \) 1356 |
\(\displaystyle \frac {\int -\frac {a b B f-A \left (f b^2+c^2 d-a c f\right )-c (B c d+A b f-a B f) x}{c x^2+b x+a}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}+\frac {\int \frac {f (b B d-A c d+a A f-(B c d+A b f-a B f) x)}{f x^2+d}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {f (b B d-A c d+a A f-(B c d+A b f-a B f) x)}{f x^2+d}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}-\frac {\int \frac {a b B f-A \left (f b^2+c^2 d-a c f\right )-c (B c d+A b f-a B f) x}{c x^2+b x+a}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {f \int \frac {b B d-A c d+a A f-(B c d+A b f-a B f) x}{f x^2+d}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}-\frac {\int \frac {a b B f-A \left (f b^2+c^2 d-a c f\right )-c (B c d+A b f-a B f) x}{c x^2+b x+a}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
\(\Big \downarrow \) 452 |
\(\displaystyle \frac {f \left ((a A f-A c d+b B d) \int \frac {1}{f x^2+d}dx-(-a B f+A b f+B c d) \int \frac {x}{f x^2+d}dx\right )}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}-\frac {\int \frac {a b B f-A \left (f b^2+c^2 d-a c f\right )-c (B c d+A b f-a B f) x}{c x^2+b x+a}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {f \left (\frac {\arctan \left (\frac {\sqrt {f} x}{\sqrt {d}}\right ) (a A f-A c d+b B d)}{\sqrt {d} \sqrt {f}}-(-a B f+A b f+B c d) \int \frac {x}{f x^2+d}dx\right )}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}-\frac {\int \frac {a b B f-A \left (f b^2+c^2 d-a c f\right )-c (B c d+A b f-a B f) x}{c x^2+b x+a}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
\(\Big \downarrow \) 240 |
\(\displaystyle \frac {f \left (\frac {\arctan \left (\frac {\sqrt {f} x}{\sqrt {d}}\right ) (a A f-A c d+b B d)}{\sqrt {d} \sqrt {f}}-\frac {\log \left (d+f x^2\right ) (-a B f+A b f+B c d)}{2 f}\right )}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}-\frac {\int \frac {a b B f-A \left (f b^2+c^2 d-a c f\right )-c (B c d+A b f-a B f) x}{c x^2+b x+a}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle \frac {f \left (\frac {\arctan \left (\frac {\sqrt {f} x}{\sqrt {d}}\right ) (a A f-A c d+b B d)}{\sqrt {d} \sqrt {f}}-\frac {\log \left (d+f x^2\right ) (-a B f+A b f+B c d)}{2 f}\right )}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}-\frac {-\frac {1}{2} \left (2 A c (c d-a f)-b B (a f+c d)+A b^2 f\right ) \int \frac {1}{c x^2+b x+a}dx-\frac {1}{2} (-a B f+A b f+B c d) \int \frac {b+2 c x}{c x^2+b x+a}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {f \left (\frac {\arctan \left (\frac {\sqrt {f} x}{\sqrt {d}}\right ) (a A f-A c d+b B d)}{\sqrt {d} \sqrt {f}}-\frac {\log \left (d+f x^2\right ) (-a B f+A b f+B c d)}{2 f}\right )}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}-\frac {\left (2 A c (c d-a f)-b B (a f+c d)+A b^2 f\right ) \int \frac {1}{b^2-(b+2 c x)^2-4 a c}d(b+2 c x)-\frac {1}{2} (-a B f+A b f+B c d) \int \frac {b+2 c x}{c x^2+b x+a}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {f \left (\frac {\arctan \left (\frac {\sqrt {f} x}{\sqrt {d}}\right ) (a A f-A c d+b B d)}{\sqrt {d} \sqrt {f}}-\frac {\log \left (d+f x^2\right ) (-a B f+A b f+B c d)}{2 f}\right )}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}-\frac {\frac {\text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (2 A c (c d-a f)-b B (a f+c d)+A b^2 f\right )}{\sqrt {b^2-4 a c}}-\frac {1}{2} (-a B f+A b f+B c d) \int \frac {b+2 c x}{c x^2+b x+a}dx}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {f \left (\frac {\arctan \left (\frac {\sqrt {f} x}{\sqrt {d}}\right ) (a A f-A c d+b B d)}{\sqrt {d} \sqrt {f}}-\frac {\log \left (d+f x^2\right ) (-a B f+A b f+B c d)}{2 f}\right )}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}-\frac {\frac {\text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (2 A c (c d-a f)-b B (a f+c d)+A b^2 f\right )}{\sqrt {b^2-4 a c}}-\frac {1}{2} \log \left (a+b x+c x^2\right ) (-a B f+A b f+B c d)}{f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2}\) |
-((((A*b^2*f + 2*A*c*(c*d - a*f) - b*B*(c*d + a*f))*ArcTanh[(b + 2*c*x)/Sq rt[b^2 - 4*a*c]])/Sqrt[b^2 - 4*a*c] - ((B*c*d + A*b*f - a*B*f)*Log[a + b*x + c*x^2])/2)/(c^2*d^2 - 2*a*c*d*f + f*(b^2*d + a^2*f))) + (f*(((b*B*d - A *c*d + a*A*f)*ArcTan[(Sqrt[f]*x)/Sqrt[d]])/(Sqrt[d]*Sqrt[f]) - ((B*c*d + A *b*f - a*B*f)*Log[d + f*x^2])/(2*f)))/(c^2*d^2 - 2*a*c*d*f + f*(b^2*d + a^ 2*f))
3.1.4.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x ^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
Int[((c_) + (d_.)*(x_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[c Int[1/ (a + b*x^2), x], x] + Simp[d Int[x/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c^2 + a*d^2, 0]
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[(2*c*d - b*e)/(2*c) Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
Int[((g_.) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_) + (f_.)* (x_)^2)), x_Symbol] :> With[{q = Simplify[c^2*d^2 + b^2*d*f - 2*a*c*d*f + a ^2*f^2]}, Simp[1/q Int[Simp[g*c^2*d + g*b^2*f - a*b*h*f - a*g*c*f + c*(h* c*d + g*b*f - a*h*f)*x, x]/(a + b*x + c*x^2), x], x] + Simp[1/q Int[Simp[ b*h*d*f - g*c*d*f + a*g*f^2 - f*(h*c*d + g*b*f - a*h*f)*x, x]/(d + f*x^2), x], x] /; NeQ[q, 0]] /; FreeQ[{a, b, c, d, f, g, h}, x] && NeQ[b^2 - 4*a*c, 0]
Time = 0.95 (sec) , antiderivative size = 239, normalized size of antiderivative = 0.87
method | result | size |
default | \(\frac {f \left (\frac {\left (-A b f +B a f -B c d \right ) \ln \left (f \,x^{2}+d \right )}{2 f}+\frac {\left (A a f -A c d +B b d \right ) \arctan \left (\frac {f x}{\sqrt {d f}}\right )}{\sqrt {d f}}\right )}{a^{2} f^{2}-2 a c d f +b^{2} d f +c^{2} d^{2}}+\frac {\frac {\left (A b c f -B a c f +B \,c^{2} d \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (-A a c f +A \,b^{2} f +A \,c^{2} d -B a b f -\frac {\left (A b c f -B a c f +B \,c^{2} d \right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{a^{2} f^{2}-2 a c d f +b^{2} d f +c^{2} d^{2}}\) | \(239\) |
risch | \(\text {Expression too large to display}\) | \(239016\) |
f/(a^2*f^2-2*a*c*d*f+b^2*d*f+c^2*d^2)*(1/2*(-A*b*f+B*a*f-B*c*d)/f*ln(f*x^2 +d)+(A*a*f-A*c*d+B*b*d)/(d*f)^(1/2)*arctan(f*x/(d*f)^(1/2)))+1/(a^2*f^2-2* a*c*d*f+b^2*d*f+c^2*d^2)*(1/2*(A*b*c*f-B*a*c*f+B*c^2*d)/c*ln(c*x^2+b*x+a)+ 2*(-A*a*c*f+A*b^2*f+A*c^2*d-B*a*b*f-1/2*(A*b*c*f-B*a*c*f+B*c^2*d)*b/c)/(4* a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2)))
Timed out. \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \left (d+f x^2\right )} \, dx=\text {Timed out} \]
Timed out. \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \left (d+f x^2\right )} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \left (d+f x^2\right )} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for more deta
Time = 0.26 (sec) , antiderivative size = 266, normalized size of antiderivative = 0.97 \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \left (d+f x^2\right )} \, dx=\frac {{\left (B c d - B a f + A b f\right )} \log \left (c x^{2} + b x + a\right )}{2 \, {\left (c^{2} d^{2} + b^{2} d f - 2 \, a c d f + a^{2} f^{2}\right )}} - \frac {{\left (B c d - B a f + A b f\right )} \log \left (f x^{2} + d\right )}{2 \, {\left (c^{2} d^{2} + b^{2} d f - 2 \, a c d f + a^{2} f^{2}\right )}} + \frac {{\left (B b d f - A c d f + A a f^{2}\right )} \arctan \left (\frac {f x}{\sqrt {d f}}\right )}{{\left (c^{2} d^{2} + b^{2} d f - 2 \, a c d f + a^{2} f^{2}\right )} \sqrt {d f}} - \frac {{\left (B b c d - 2 \, A c^{2} d + B a b f - A b^{2} f + 2 \, A a c f\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (c^{2} d^{2} + b^{2} d f - 2 \, a c d f + a^{2} f^{2}\right )} \sqrt {-b^{2} + 4 \, a c}} \]
1/2*(B*c*d - B*a*f + A*b*f)*log(c*x^2 + b*x + a)/(c^2*d^2 + b^2*d*f - 2*a* c*d*f + a^2*f^2) - 1/2*(B*c*d - B*a*f + A*b*f)*log(f*x^2 + d)/(c^2*d^2 + b ^2*d*f - 2*a*c*d*f + a^2*f^2) + (B*b*d*f - A*c*d*f + A*a*f^2)*arctan(f*x/s qrt(d*f))/((c^2*d^2 + b^2*d*f - 2*a*c*d*f + a^2*f^2)*sqrt(d*f)) - (B*b*c*d - 2*A*c^2*d + B*a*b*f - A*b^2*f + 2*A*a*c*f)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/((c^2*d^2 + b^2*d*f - 2*a*c*d*f + a^2*f^2)*sqrt(-b^2 + 4*a*c))
Time = 75.86 (sec) , antiderivative size = 3888, normalized size of antiderivative = 14.19 \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \left (d+f x^2\right )} \, dx=\text {Too large to display} \]
(log(B^3*c^2*f^2*x + (((B*c*d^2)/2 + (A*b*d*f)/2 - (B*a*d*f)/2 - (A*a*f*(- d*f)^(1/2))/2 + (A*c*d*(-d*f)^(1/2))/2 - (B*b*d*(-d*f)^(1/2))/2)*((((B*c*d ^2)/2 + (A*b*d*f)/2 - (B*a*d*f)/2 - (A*a*f*(-d*f)^(1/2))/2 + (A*c*d*(-d*f) ^(1/2))/2 - (B*b*d*(-d*f)^(1/2))/2)*(4*A*a^2*c^2*f^4 + 4*A*c^4*d^2*f^2 - c *f^2*x*(3*A*b^3*f^2 + 4*B*c^3*d^2 - B*a*b^2*f^2 + 4*B*a^2*c*f^2 - 12*A*a*b *c*f^2 + 12*A*b*c^2*d*f - 8*B*a*c^2*d*f - 3*B*b^2*c*d*f) - 3*A*b^2*c^2*d*f ^3 - 4*B*b*c^3*d^2*f^2 - A*a*b^2*c*f^4 - 8*A*a*c^3*d*f^3 + B*b^3*c*d*f^3 + (2*c*f^2*((B*c*d^2)/2 + (A*b*d*f)/2 - (B*a*d*f)/2 - (A*a*f*(-d*f)^(1/2))/ 2 + (A*c*d*(-d*f)^(1/2))/2 - (B*b*d*(-d*f)^(1/2))/2)*(2*b*c^3*d^3 + 4*c^4* d^3*x - a^2*b^2*f^3*x + 4*a*b^3*d*f^2 - 2*b^3*c*d^2*f + 4*a^3*c*f^3*x + 3* b^4*d*f^2*x + 12*a*b*c^2*d^2*f - 14*a^2*b*c*d*f^2 - 4*a*c^3*d^2*f*x - 4*a^ 2*c^2*d*f^2*x + 3*b^2*c^2*d^2*f*x - 10*a*b^2*c*d*f^2*x))/(d*(a^2*f^2 + c^2 *d^2 + b^2*d*f - 2*a*c*d*f)) + 4*B*a*b*c^2*d*f^3))/(d*(a^2*f^2 + c^2*d^2 + b^2*d*f - 2*a*c*d*f)) - c*f^2*x*(2*B^2*c^2*d - 4*A^2*c^2*f - B^2*b^2*f + 2*B^2*a*c*f + 2*A*B*b*c*f) + A^2*b*c^2*f^3 + B^2*b*c^2*d*f^2 - 4*A*B*a*c^2 *f^3 + A*B*b^2*c*f^3 - 4*A*B*c^3*d*f^2))/(d*(a^2*f^2 + c^2*d^2 + b^2*d*f - 2*a*c*d*f)) + A*B^2*c^2*f^2)*(f*((B*a*d)/2 - (A*b*d)/2 + (A*a*(-d*f)^(1/2 ))/2) - (B*c*d^2)/2 - (A*c*d*(-d*f)^(1/2))/2 + (B*b*d*(-d*f)^(1/2))/2))/(c ^2*d^3 + a^2*d*f^2 + b^2*d^2*f - 2*a*c*d^2*f) - (log(B^3*c^2*f^2*x + (((B* c*d^2)/2 + (A*b*d*f)/2 - (B*a*d*f)/2 + (A*a*f*(-d*f)^(1/2))/2 - (A*c*d*...